import axios from "../../axios"
const LIPEI_URL = "/lipei"
const lipeiApi = {
    //获取所有理赔信息
    getAlllipei(params) {
        return axios({
            url: LIPEI_URL + "/getAllLipei",
            method: 'get',
            params,
        });
    },
    //增加理赔信息
    addLipei(data){
        return axios({
            url:LIPEI_URL + "/addLipei",
            method:'post',
            data,
        });
    },
    //获取销售下的理赔信息
    getSaleLipei(params){
        return axios({
            url:LIPEI_URL + "/getSaleLipei",
            method:'get',
            params,
        });
    },
    //同意理赔
    agreeLipei(data) {
        return axios({
            url: LIPEI_URL + "/agreeLipei",
            method: 'post',
            data,
        })
    },
    //撤回理赔
    backLipei(data){
        return axios({
            url: LIPEI_URL + "/backLipei",
            method: 'post',
            data,
        })
    },
    //删除理赔
    deleteOne(_id) {
        return axios({
            url: LIPEI_URL + "/deleteOne",
            method: 'post',
            data: { _id }
        });
    },
    //获取理赔修改信息
    getLipeiUpdataOne(_id){
        // console.log("API中", _id);
        return axios({
            url:LIPEI_URL + "/getUpdataOneLipei",
            method:'get',
            params:{_id}
        });
    },
    //确认修改
    sureLipeiUpdataOne(claim){
        console.log('API中',claim);
        return axios({
            url:LIPEI_URL + "/SureUpdataOneLipei",
            method:'post',
            data:claim,
        });
    }

}
export default lipeiApi;